Ext.define('Usws.view.videoFile.VideoFileEdit', {
    extend: 'Ext.window.Window',
    xtype: 'VideoFile-Edit',
    title: '编辑视频文件信息',
    layout: 'hbox',
    autoShow: true,
    modal: true,
    initComponent: function() {
        this.items = [
            {
            	 xtype: 'form',
                 border: 0,
                 padding:'10px',
                 items: [
                      { xtype: 'hiddenfield', name:'videoFile.uid', id: 'uid'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.videoPath', id: 'videoPath'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.snapshot', id: 'videoFileSnapshot'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.origFileName', id: 'videoFileOrigFileName'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.fileSize', id: 'videoFileSize'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.mimeType', id: 'videoMimeType'}
                     ,{ xtype: 'hiddenfield', name:'videoFile.fileExt', id: 'videoFileExt'}
 					,{
 						xtype: 'filefield',
 			        	name:'file',
 			        	id: 'uploadVideoFilePreviewPic',
 			        	buttonText:'选择',
 			            fieldLabel: '视频缩略图'
 			         }
 					,{
 						xtype: 'filefield',
 			        	name:'file',
 			        	id: 'uploadVideoFile',
 			        	buttonText:'选择',
 			            fieldLabel: '视频文件'
 			         }
 					,{xtype: 'textfield', name:'videoFile.disPlayLen', id:'disPlayLen', fieldLabel: '片长',  emptyText:'00:00:00'}
                 ]
             }
             ,{
                 xtype: 'panel',
                 border: false,
                 bodyPadding: 10,
                 layout:'vbox',
                 items: [
 					        {
 					        	xtype:'panel',
 					        	id:'previewVideoFilePreviewPicPanel',
 					        	border: false,
 					        	items:[
 										{
 										    xtype: 'displayfield',
 										    fieldLabel: '预览视频缩略图'
 										},
 										{
 											xtype: 'panel',
 								        	border:false,
 										    width:80,
 										    height:60,
 										    id:'previewVideoFilePreviewPic',
 										    html:'<img src="/images/no_pic.gif" width="80" height="60"/>'
 										}
 					        	      ]
 					        	
 					        }
 					       ,
 					        {
 					        	xtype:'panel',
 					        	id:'previewVideoFilePanel',
 					        	border: false,
 					        	items:[
 										{
 										    xtype: 'displayfield',
 										    fieldLabel: '预览视频'
 										},
 										{
 											xtype: 'panel',
 								        	border:false,
 										    id:'previewVideoFile',
 										    width:350,
 										    height:160
 										    /* html: '<object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA">'
 										          +'<param name="ShowDisplay" value="0">'
 										          +'<param name="ShowControls" value="1">'
 										          +'<param name="AutoStart" value="1">'
 										          +'<param name="AutoRewind" value="0">'
 										          +'<param name="PlayCount" value="0">'
 										          +'<param name="Appearance value="0 value=""">'
 										          +'<param name="BorderStyle value="0 value=""">'
 										          +'<param name="MovieWindowHeight" value="240">'
 										          +'<param name="MovieWindowWidth" value="320">'
 										          +'<param name="FileName" value="行走在山梁上 超清.mp4">'
 										          +'<embed width="400" height="200" border="0" showdisplay="0" showcontrols="1" autostart="1" autorewind="0" playcount="0" moviewindowheight="240" moviewindowwidth="320" filename="行走在山梁上 超清.mp4" src="行走在山梁上 超清.mp4">'
 										          +'</embed>' 
 										          +'</object>'
 										          */
 										    	/*
 										          '<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" '
 										          +'CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" WIDTH="300" HEIGHT="150" >'
 										          +'<PARAM NAME="src" VALUE="test.mp4" >'
 										          +'<PARAM NAME="autoplay" VALUE="true" >'
 										          +'<EMBED SRC="test.mp4" TYPE="image/x-macpaint" '
 										          +'PLUGINSPAGE="http://www.apple.com/quicktime/download" WIDTH="300" HEIGHT="150" AUTOPLAY="true"></EMBED>'
 										          +'</OBJECT>'  */
 										}
 					        	      ]
 					        	
 					        } 
                 ]
             }
        ];

        this.buttons = [
            {
                text: '确定',
                action: 'save'
            },
            {
                text: '取消',
                scope: this,
                handler: this.close
            }
        ];
        
        this.callParent(arguments);
    }
});